package com.aspose.cells.a.d;

import java.util.Iterator;

public class zcr {
   private static final com.aspose.cells.b.c.a.za a = new com.aspose.cells.b.c.a.za(new String[]{"application/vnd.openxmlformats-package.relationships+xml", "image/bmp", "image/x-emf", "image/gif", "image/jpeg", "image/x-pcz", "image/png", "image/x-wmf"});

   public static void a(zct var0, boolean var1) throws Exception {
      zfk var2 = new zfk();
      zfk var3 = new zfk();
      Iterator var4 = var0.b().iterator();

      while(var4.hasNext()) {
         zcv var5 = (zcv)var4.next();
         switch(a.a(var5.c())) {
         case 0:
            break;
         case 1:
         case 2:
         case 3:
         case 4:
         case 5:
         case 6:
         case 7:
            if (!var2.a(var5.b())) {
               var2.a(var5.b(), var5.c());
            }
            break;
         default:
            var3.a(var5.a(), var5.c());
         }
      }

      zcv var8 = new zcv("/[Content_Types].xml", "");
      com.aspose.cells.zal var9 = new com.aspose.cells.zal(var8.d(), var1);
      var9.a("Types");
      var9.c("xmlns", "http://schemas.openxmlformats.org/package/2006/content-types");
      Iterator var6 = var2.iterator();

      com.aspose.cells.b.a.a.za var7;
      while(var6.hasNext()) {
         var7 = (com.aspose.cells.b.a.a.za)var6.next();
         a((String)var7.getKey(), (String)var7.getValue(), var9);
      }

      a("rels", "application/vnd.openxmlformats-package.relationships+xml", var9);
      a("xml", "application/xml", var9);
      var6 = var3.iterator();

      while(var6.hasNext()) {
         var7 = (com.aspose.cells.b.a.a.za)var6.next();
         b((String)var7.getKey(), (String)var7.getValue(), var9);
      }

      var9.b();
      var0.b().a(var8);
   }

   private static void a(String var0, String var1, com.aspose.cells.zal var2) throws Exception {
      var2.b("Default");
      var2.c("Extension", var0);
      var2.c("ContentType", var1);
      var2.c();
   }

   private static void b(String var0, String var1, com.aspose.cells.zal var2) throws Exception {
      var2.b("Override");
      var2.c("PartName", var0);
      var2.c("ContentType", var1);
      var2.c();
   }
}
